<template>
  <div class="box">
    <!-- 左上box -->
    <HerinContainer
      class="MainCoal-box"
      :delay="1"
      direction="Left"
      title="避灾路线统计"
      style="height: 239px"
    >
      <!-- 避灾路线统计 -->
      <div slot="content" class="MainCoal-box-content">
        <div class="sensorSum">
          <p class="sum">
            <img src="@/assets/img/monitor/icon-4.png" alt="" />避灾路线数量
          </p>
          <p>
            <span class="num" style="color: rgba(0, 253, 255, 100)">20</span
            ><span class="piece">条</span>
          </p>
        </div>
        <div class="outage">
          <div v-for="(v, disasterData) in disasterData" :key="disasterData">
            <p class="title">{{ v.title }}</p>
            <p>
              <span class="num">{{ v.num }}</span
              ><span class="piece">条</span>
            </p>
          </div>
        </div>
      </div>
    </HerinContainer>
    <!-- 左下box -->
    <HerinContainer
      class="MainCoal-box"
      :delay="1"
      direction="Left"
      title="井下硐室统计"
      style="height: 731px"
    >
      <!-- 井下硐室统计-->
      <div slot="content" class="MainCoal-box-content">
        <div class="sensorSum">
          <p class="sum">
            <img src="@/assets/img/monitor/icon-5.png" alt="" />硐室数量
          </p>
          <p>
            <span class="num" style="color: rgba(0, 253, 255, 100)">20</span
            ><span class="piece">个</span>
          </p>
        </div>
        <div style="height: 635px; overflow: auto;width: calc(100% + 10px);padding-right: 10px;">
          <div class="cont" v-for="(v, chamber) in chamber" :key="chamber">
            <div class="head">
              <div class="bord"></div>
              <p class="title">{{ v.title }}</p>
              <p class="show">
                <img src="@/assets/img/monitor/icon-6.png" alt="" />{{ v.show }}
              </p>
            </div>
            <div class="materials">
              <p>
                <span class="name">救援物资</span
                ><span style="color: #2ed6e6">{{ v.num1 }}</span
                ><span class="pieceMAST">个</span>
              </p>
              <p>
                <span class="name">防护物资</span
                ><span style="color: #fbda6b">{{ v.num2 }}</span
                ><span class="pieceMAST">个</span>
              </p>
              <p>
                <span class="name">医疗物资</span
                ><span style="color: #05d783">{{ v.num3 }}</span
                ><span class="pieceMAST">个</span>
              </p>
            </div>
          </div>
        </div>
      </div>
    </HerinContainer>
  </div>
</template>
<script>
import HerinContainer from '@/components/HerinContainer';

export default {
  components: {
    HerinContainer
  },
  data() {
    return {
      chamber: [
        {
          title: '1#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          num1: '15',
          num2: '10',
          num3: '13'
        },
        {
          title: '1#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          num1: '15',
          num2: '10',
          num3: '13'
        },
        {
          title: '1#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          num1: '15',
          num2: '10',
          num3: '13'
        },
        {
          title: '1#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          num1: '15',
          num2: '10',
          num3: '13'
        },
        {
          title: '1#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          num1: '15',
          num2: '10',
          num3: '13'
        },
        {
          title: '1#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          num1: '15',
          num2: '10',
          num3: '13'
        },
        {
          title: '1#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          num1: '15',
          num2: '10',
          num3: '13'
        },
        {
          title: '1#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          num1: '15',
          num2: '10',
          num3: '13'
        },
        {
          title: '1#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          num1: '15',
          num2: '10',
          num3: '13'
        },
        {
          title: '1#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          num1: '15',
          num2: '10',
          num3: '13'
        },
        {
          title: '1#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          num1: '15',
          num2: '10',
          num3: '13'
        },
        {
          title: '1#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          num1: '15',
          num2: '10',
          num3: '13'
        },
        {
          title: '1#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          num1: '15',
          num2: '10',
          num3: '13'
        },
        {
          title: '1#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          num1: '15',
          num2: '10',
          num3: '13'
        },
        {
          title: '1#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          num1: '15',
          num2: '10',
          num3: '13'
        },
        {
          title: '1#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          num1: '15',
          num2: '10',
          num3: '13'
        },
        {
          title: '1#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          num1: '15',
          num2: '10',
          num3: '13'
        },
        {
          title: '1#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          num1: '15',
          num2: '10',
          num3: '13'
        },
        {
          title: '1#硐室',
          show: '15217-18内外撤架巷、联巷及15217-18内外撤架巷、联巷及',
          num1: '15',
          num2: '10',
          num3: '13'
        }
      ],
      disasterData: [
        {
          title: '瓦斯避灾',
          num: '6'
        },
        {
          title: '水灾避灾',
          num: '5'
        },
        {
          title: '火灾避灾',
          num: '6'
        },
        {
          title: '顶板避灾',
          num: '4'
        }
      ]
    };
  }
};
</script>
<style lang="scss" scoped>
.MainCoal-box {
  &-tab {
    display: flex;
    .btn {
      @include btn;
    }
    .isbtn {
      background-color: rgba(0, 228, 255, 0.2);
      color: $cyan;
    }
  }
  &-content {
    .mouldbox {
      margin-top: 1.875rem;
    }
    .mouldbox:first-child {
      margin-top: 0.3125rem;
    }
  }
  .num {
    font-size: 16px;
    text-align: right;
    font-family: Helvetica-bold;
  }
  .piece {
    color: rgba(131, 131, 131, 100);
    font-size: 12px;
    text-align: left;
    font-family: Helvetica-regular;
    margin: 0 0.9375rem 0 0.3125rem;
    display: inline;
  }
  .sensorSum {
    display: flex;
    width: 20.625rem;
    justify-content: space-between;
    color: rgba(16, 16, 16, 100);
    font-size: 14px;
    margin-bottom: 0.9375rem;
    img {
      width: 1.25rem;
      margin: 0 0.75rem 0 0;
      height: 1.25rem;
    }
    p {
      display: flex;
      align-items: center;
    }
    .sum {
      color: rgba(248, 248, 248, 100);
      font-size: 14px;
      text-align: left;
      font-family: Helvetica-regular;
    }
  }
  .charttitle {
    font-size: 0.75rem;
    color: $light2Grey;
    margin: 0.625rem 0;
  }
  .broken {
    height: 2.375rem;
    width: 20.625rem;
    display: flex;
    justify-content: space-between;
    div {
      width: 10rem;
      border-radius: 2px;
      background-color: rgba(255, 255, 255, 0.1);
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-left: 0.625rem;
    }
    .title {
      color: rgba(248, 248, 248, 100);
      font-size: 14px;
    }
    .num {
      color: rgba(0, 253, 255, 100);
      font-size: 16px;
      font-weight: 900;
    }
  }
  .sensorSort {
    display: flex;
    justify-content: space-between;
    align-items: center;
    .chat {
      width: 8.5625rem;
      height: 7.4375rem;
    }
    .right {
      width: 8.125rem;
      height: 7.4375rem;
      display: flex;
      flex-direction: column;
      align-content: space-between;
      p {
        margin: 0;
      }
      .point {
        display: inline-block;
        width: 0.5rem;
        height: 0.5rem;
        border-radius: 50%;
      }
      .title {
        color: rgba(173, 173, 173, 100);
        font-size: 12px;
        margin: 0 0.75rem 0 0.375rem;
        display: inline-block;
        width: 2.25rem;
      }
      .num {
        color: rgba(248, 248, 248, 100);
        font-size: 14px;
        margin-right: 0.3125rem;
      }
    }
  }
  .outage {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    div:nth-child(-n + 2) {
      margin-bottom: 0.9375rem;
    }
    div {
      width: 9.6875rem;
      height: 3.9375rem;
      background-color: rgba(255, 255, 255, 0.1);
      border-radius: 4px;
      p {
        text-align: center;
      }
      .title {
        color: rgba(248, 248, 248, 100);
        font-size: 14px;
        margin: 0.625rem 0 0.4rem 0;
      }
      .num {
        color: rgba(251, 218, 107, 100);
        font-size: 16px;
      }
    }
  }
  .cont:last-child{
    margin-bottom: 0;
  }
  .cont {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0 0.625rem;
    height: 3.9375rem;
    margin-bottom: 10px;
    overflow: hidden;
    img {
      width: 0.75rem;
      height: 0.75rem;
    }
    .head {
      display: flex;
      justify-content: space-between;
      position: relative;
      margin: 6px 0 8px 0;
      .bord {
        position: absolute;
        width: 0.125rem;
        height: 0.875rem;
        background-color: rgba(87, 255, 170, 100);
        left: -0.625rem;
        top: 0.1875rem;
      }
      .title {
        color: rgba(248, 248, 248, 100);
        font-size: 14px;
      }
      .show {
        color: rgba(173, 173, 173, 100);
        font-size: 12px;
        width: 11.5625rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: 1.1875rem;
      }
    }
    .materials {
      display: flex;
      justify-content: space-between;
      align-items: center;
      .name {
        color: rgba(248, 248, 248, 100);
        font-size: 12px;
        margin-right: 0.3125rem;
      }
      .pieceMAST {
        margin-left: 0.3125rem;
        color: rgba(131, 131, 131, 100);
        font-size: 12px;
        text-align: left;
        font-family: Helvetica-regular;
      }
    }
  }
}
</style>
